home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk158 / mat / sass < prev    next >
Text File  |  1995-03-19  |  1KB  |  26 lines

  1. .K dest
  2. .BRA {
  3. .KET }
  4. ;;    SASS      --  Preserves current assigns in a re-executable script.
  5.  
  6. run assign >PIPE:SASS_0
  7. run ElideS <PIPE:SASS_0 >PIPE:SASS
  8. echo >{dest$re-assign} "failat 25"
  9. mat >>{dest$re-assign} "~(T|S|L|C|LIBS|DEVS|FONTS|UTIL|SYS)^ ^~(Volume):#?" "assign ^0: ^Q^2^Q" PIPE:SASS
  10. echo >>{dest$re-assign} "failat 10"
  11. protect {dest$re-assign} +S
  12.  
  13. ;; The output of the ASSIGN (list) command is fed to a PIPE.  This is
  14. ;; processed by an intermediate program ElideS, which takes out the many
  15. ;; extra spaces ASSIGN puts in its output (which is one thing Mat has
  16. ;; difficulty with) and passes it on to Mat through another pipe.
  17. ;; Mat's Pattern argument has two negations ('~') that prevent it matching
  18. ;; any of the standard assigns, or other superfluous lines;  there are
  19. ;; also two slice marks ('^') that chop out the assigned name (slice 0) and
  20. ;; its directory (slice 2).
  21. ;; The template argument generates appropriate assign commands to
  22. ;; reproduce these asociations.
  23. ;; It would have been possible to replace the two "echo" lines with
  24. ;; labels in the Mat command, but it's probably long enough already...
  25.  
  26.